﻿using Common;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;

namespace Respository.SqlServerRespository
{
    public class SqlServerContext
    {

        private static string _defaultConnStr = Appsettings.app(new string[] { "SqlServer", "ConnStr" });

        public static IDbConnection GetSqlConnection(string sqlConnectionString = null)
        {
            if (string.IsNullOrWhiteSpace(sqlConnectionString))
            {
                sqlConnectionString = Appsettings.app(new string[] { "SqlServer", "ConnStr" }); ;
            }
            IDbConnection conn = new SqlConnection(sqlConnectionString);
            conn.Open();
            return conn;
        }

        
    }
}
